#include "Blok.h"

Blok::Blok(byte *bytes) {
	usecount = 0;
	for (int i = 0 ; i < DBLKSIZ; ++i){
		this->bytes[i] = bytes[i];
	}
}

Blok::~Blok() {
}

byte* Blok::getBytes(byte* buffer, int offset, int length){

	for (int i = offset; i < offset+length; ++i)
		buffer[i-offset] = bytes[i];

	return buffer;
}

byte* Blok::getBytes() {
    return bytes;
}

void Blok::incrementUsecount() {
	++usecount;
}

int Blok::getUsecount() {
	return usecount;
}
